<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name=”viewport” content=”user-scalable=no, width=device-width” />
    <style>
         body{
            width: 100%;
            margin: 0;
            background-color: #ffffff;
             overflow: auto;
        }
        #show{
            width: 100%;
            background-color: #ffffff;
        }
        #detail_article {
            height: 100%;
        }
        #detail_title{
            font-size: 20px;
            font-weight: bold;
            color: #000;
            text-align: center;
            padding-top: 22px;
        }
        #detail_content{
            margin: auto;
            font-size: 16px;
            color: #000;
            line-height: 1.5;
            width:90%;
            text-align: justify;
            word-wrap:break-word;


        }
        #detail_content img{
            margin:auto;
            width:100%;
            box-shadow:0 0 5px #000;
        }
    </style>
</head>
<body>
  <div id="show">
      <div id="detail_article">
          <div id="detail_title"></div>
          <div id="detail_content"></div>
      </div>
  </div>
</body>
<script>
function loadData(data) {
//    alert('loadData');
//    $("#show").append('<div id="detail_article">'+
//                      '<div id="detail_title">'+data.subject+'</div>'+
//                      '<div id="detail_content">'+data.message+'</div></div>');
    $("#detail_title").html(data.subject);
    $("#detail_content").html(data.message);
    
    $("#detail_content p").css({
       'word-wrap':'break-word'
   });

//    $("#detail_content img").each(function(){
//       var src = $(this).attr("src");
//       $(this).attr("src", 'http://211.103.154.149/supersite/' + src);
//    });
}
    function loadNovelData(data){
//        alert('loadData'+data.result);
        data = data.result;
        var text = data[0].text;
        text = text.replace(/&lt;br\/&gt;/g,'<br>');
        $("#detail_content").html(text);
//        $("#detail_content p").css({
//           'word-wrap':'break-word'
//        });

    }
    function loadNewspaperData(data){
    //        alert('loadData'+data.result);
        data = data.result;
        var text = data.content;
        text = text.replace(/&lt;br\/&gt;/g,'<br>');
        $("#detail_content").html(text);
        $("#detail_title").html(data.title);
    
//        $("#detail_content").css({
//             'word-break':'break-all'
//        });
        $("#detail_content p").css({
            'word-wrap':'break-word'
        });

    }

    function changeTheme(flag){
//        alert('changeTheme '+flag);
    if(flag==1){  //白天模式
        $("#detail_article").css({
            'background-color':'#FEFFFF' ,
            '-webkit-transition-duration':'0s'
        });
        $("#detail_article div").css({
             'color':'#171F25',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_article p").css({
              'background-color':'#FEFFFF' ,
              '-webkit-transition-duration':'0s'
        });
     }else if(flag==2){  //夜间模式
         $("#detail_article").css({
              'background-color':'#171F25' ,
              '-webkit-transition-duration':'0s'
          });
         $("#detail_article div").css({
              'color':'#7791A6',
              '-webkit-transition-duration':'0s'
          });
          $("#detail_article p").css({
             'background-color':'#171F25' ,
             '-webkit-transition-duration':'0s'
          });

    }else if(flag==3){  //护眼模式
        $("#detail_article").css({
             'background-color':'#CBEACB' ,
             '-webkit-transition-duration':'0s'
         });
        $("#detail_article div").css({
             'color':'#0D2C2E',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_article p").css({
            'background-color':'#CBEACB' ,
            '-webkit-transition-duration':'0s'
        });

    } else if(flag==4){  //怀旧模式
        $("#detail_article").css({
             'background-color':'#2C291A' ,
             '-webkit-transition-duration':'0s'
         });
        $("#detail_article div").css({
             'color':'#CCBEA4',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_article p").css({
            'background-color':'#2C291A' ,
            '-webkit-transition-duration':'0s'
        });

    }

} 
 function changeFontSize(fontSize){
     $("#detail_article").css({
          '-webkit-transition-duration':'0s'
      });
      $("#detail_article div").css({
           '-webkit-transition-duration':'0s'
       });
//     alert('changeFontSize '+fontSize);
	 if(fontSize==1){  //小
         $("#detail_content").css({
        	 'font-size':'13px',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_title").css({
        	 'font-size':'16px',
             '-webkit-transition-duration':'0s'
         });
         
         $("#detail_content p").css({
              'font-size':'13px',
              '-webkit-transition-duration':'0s'
          });

      }else if(fontSize==2){  //中
         $("#detail_content").css({
        	 'font-size':'16px',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_title").css({
        	 'font-size':'20px',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_content p").css({
              'font-size':'16px',
              '-webkit-transition-duration':'0s'
          });

     }else if(fontSize==3){  //大
         $("#detail_content").css({
        	 'font-size':'20px',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_title").css({
        	 'font-size':'23px',
             '-webkit-transition-duration':'0s'
         });
         $("#detail_content p").css({
              'font-size':'20px',
              '-webkit-transition-duration':'0s'
          });

     } 
 }
</script>

</html>